package com.qfedu.yanglao20admin.inform.service.impl;

import com.qfedu.yanglao20admin.inform.dao.AlarmDisposeDao;
import com.qfedu.yanglao20admin.inform.dao.AlarmRecordDao;
import com.qfedu.yanglao20admin.inform.param.AlarmDisposeParam;
import com.qfedu.yanglao20admin.inform.service.AlarmDisposeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author yujie
 * @data 2023/4/28 14:40
 */
@Service
public class AlarmDisposeServiceImpl implements AlarmDisposeService {

    @Resource
    private AlarmDisposeDao alarmDisposeDao;

    @Resource
    private AlarmRecordDao alarmRecordDao;

    /**
     * 添加处理纪录信息，以及修改状态
     *
     * @param param
     */
    @Override
    public void addAlarmDispos(AlarmDisposeParam param) {

        // 添加处理纪录信息
        alarmDisposeDao.insert(param);

        // 修改状态
        alarmRecordDao.updateState(param.getStateFlag(), param.getRecordId());
    }
}
